<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{:$i->title}</title>
<link href="{:$smarty.const.PUBLIC_DIR}/common/style/admin.css" rel="stylesheet" type="text/css" />
<body>
<div class="wrapper">
  <div class="title shadow titleBg">
    <table width="100%" border="0" cellspacing="1">
      <tr>
        <td><h1> {:$i->title} </h1></td>
      </tr>
    </table>
  </div> 

  <div class="content shadow">
    <table width="100%" border="0" cellspacing="1">
      <tr class="titleBg">
        <th class="textL">一键更新</th>
      </tr>
      <tr>
        <td class="textL"><input name="update" value="开始更新" type="button" onclick="window.location.href='{:$smarty.const.BOOT_URL}/html/update/all';" /></td>
      </tr>
    </table>
  </div>   
  <div class="content shadow">
    <table width="100%" border="0" cellspacing="1">
      <tr class="titleBg">
        <th class="textL">更新首页</th>
      </tr>
      <tr>
        <td class="textL">模板文件：/template/{:$i->Load->var.style}/{:$i->Load->var.homepageTemplateName}</td>
      </tr>
      <tr>
        <td class="textL">生成文件：{:$smarty.const.ROOT_PATH}/{:$i->Load->var.homepageFileName} [<a href="#@" class="helpTip" title="首页模板和生成的文件名可以在〖全局变量〗里修改">?</a>]</td>
      </tr>
      <tr>
        <td class="textL"><input name="update" value="开始更新" type="button" onclick="window.location.href='{:$smarty.const.BOOT_URL}/html/update/homepage';" /></td>
      </tr>
    </table>
  </div>   
  <div class="content shadow">
    <table width="100%" border="0" cellspacing="1">
      <tr class="titleBg">
        <th class="textL">更新栏目</th>
      </tr>
      <tr>
        <td class="textL">选择栏目：<select name="categoryId" id="categoryId" onchange="if(!this.value){alert('请选择白色背景的栏目');this.value = 0;return false;}">              <option value="0">--所有栏目--</option>
              {:foreach item=item from=$i->category}
              <option value="{:$item->id}">{:$item->name}</option>
            {:/foreach}
            </select></td>
      </tr>
      <tr>
        <td class="textL"><input name="update" value="开始更新" type="button" onclick="window.location.href='{:$smarty.const.BOOT_URL}/html/update/category/'+$('#categoryId').val();" /></td>
      </tr>
    </table>
  </div>
  
  <div class="content shadow">
    <form action="{:$smarty.const.BOOT_URL}/html/update/archive" method="get" >
<table width="100%" border="0" cellspacing="1">
      <tr class="titleBg">
        <th class="textL">更新文档</th>
      </tr>
      <tr>
        <td class="textL">
        <select name="limitTime" onchange="if(this.value == 1)$('#timeArea').show();else $('#timeArea').hide();"><option value="0" selected="selected">不限时间</option><option value="1">时间范围</option></select>
        <span id="timeArea" class="hidden">
        <input value="0000-00-00 00:00:00" name="startTime" id="startTime" size="18" />  →  
        <input value="{:$smarty.now|date_format:'%Y-%m-%d'} 23:59:59" name="endTime" id="endTime" size="18" />
         </span></td>
      </tr>
      <tr>
        <td class="textL">
        <select name="limitId" onchange="if(this.value == 1)$('#idArea').show();else $('#idArea').hide();"><option value="0" selected="selected">不限ＩＤ</option><option value="1">ＩＤ范围</option></select>
        <span id="idArea" class="hidden">
        <input value="0" name="startId" id="startId" size="10" class="" />  →  
        <input value="0" name="endId" id="endId" size="10" class="" />
         [<a href="#@" class="helpTip" title="0表示不限制">?</a>]</span></td>
      </tr>
      <tr>
        <td class="textL"><input name="" type="submit" value="开始更新" type="button" /></td>
      </tr>
    </table>
</form>
  </div>
</div>
<link href="{:$smarty.const.PUBLIC_DIR}/common/style/tooltip.css" rel="stylesheet" type="text/css" />
<link href="{:$smarty.const.PUBLIC_DIR}/common/style/ui.all.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/ui.core.js"></script>
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/ui.draggable.js"></script>
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/ui.resizable.js"></script>
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/ui.dialog.js"></script>
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/ui.datepicker.js"></script>
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/jquery.tooltip.js"></script>
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/common.js"></script>
<script language="javascript" type="text/javascript">

$(document).ready(function() {
	$(".helpTip").tooltip({cssClass:"tooltip", xOffset:30, opacity:5});
	$("#startTime").datepicker({ dateFormat: 'yy-mm-dd', maxDate: '+0', changeMonth: true, changeYear: true,onSelect: function(dateText) { this.value += ' 00:00:00' }});
	$("#endTime").datepicker({ dateFormat: 'yy-mm-dd' , maxDate: '+0', changeMonth: true, changeYear: true,onSelect: function(dateText) { this.value += ' 23:59:59' } });
});

</script>
</body>
</html>
